package com.huayue.service;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.huayue.dao.BaseDao;
import com.huayue.dao.CustomerDao;
import com.huayue.entity.Customer;

/**
 * 顾客
 * 
 */
@Service
public class CustomerService extends BaseService<Customer> {

    @Autowired
    CustomerDao CustomerDao;

    @Override
    public BaseDao<Customer> getDao() {
        return CustomerDao;
    }

    public int finduser(Customer Customer) {
        return CustomerDao.finduser(Customer);
    }

    /**
     * 查询一个用户账户（手机号）是否存在
     */
    public Map<String, Object> findOnePhone(Customer customer) {
        return CustomerDao.findOnePhone(customer);
    }

    public int addBasic(Customer customer, String roomId) {
        return CustomerDao.addBasic(customer, roomId);
    }
}
